home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / JOE_SOUR.LHA / Sources.lha / Tempest / tempest->s!xconvert / express.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-02  |  12.7 KB  |  485 lines

  1. #define SUCCESS 0
  2. #define PRIVATE 10
  3. #define LCFILES 9
  4. #define FAILURE -1
  5. #define NOTALLOWED 1
  6. #define NOTTESTED  2
  7. #define ABORT    -2 
  8. #define HISTORY 999
  9. #define MAXHIST 20
  10.  
  11. #define NOSCREENS 0
  12. #define BBSSCREENS 1
  13. #define NODESCREENS 2
  14.  
  15. #define KEYBOARD_TIMEOUT 300L
  16.  
  17. #ifndef FOREVER
  18. #       define FOREVER for(;;)
  19. #endif
  20.  
  21. #define FALSE 0
  22. #define TRUE  1
  23.  
  24. #define AWAIT_LOGON     0
  25. #define SYSOP_LOGON     1
  26. #define LOCAL_LOGON     2
  27. #define REMOTE_LOGON    3
  28. #define GOODBYE_LOGON   4
  29. #define SUSPEND_LOGON   5
  30.  
  31. #define STANDARD_LOGOFF 1
  32. #define SLEEP_LOGOFF    2
  33. #define OVERTIME_LOGOFF 3
  34. #define CARRIER_LOGOFF  4
  35. #define ILLEGAL_LOGOFF  5
  36.  
  37. #define ENV_IDLE        0
  38. #define ENV_DOWNLOADING 1
  39. #define ENV_UPLOADING   2
  40. #define ENV_DOORS       3
  41. #define ENV_MAIL        4
  42. #define ENV_STATS       5
  43. #define ENV_ACCOUNT     6
  44. #define ENV_ZOOM        7
  45. #define ENV_FILES       8
  46. #define ENV_BULLETINS   9
  47. #define ENV_VIEWING     10
  48. #define ENV_ACCOUNTSEQ  11
  49. #define ENV_LOGOFF      12
  50. #define ENV_SYSOP       13
  51. #define ENV_SHELL       14
  52. #define ENV_EMACS       15
  53. #define ENV_JOIN        16
  54. #define ENV_CHAT        17
  55. #define ENV_NOTACTIVE   18
  56. #define ENV_REQ_CHAT    19
  57. #define ENV_CONNECT     20
  58. #define ENV_LOGGINGON   21
  59. #define ENV_AWAITCONNECT 22
  60. #define ENV_SCANNING     23
  61. #define ENV_SHUTDOWN     24
  62. #define ENV_MULTICHAT    25
  63. #define ENV_SUSPEND      26
  64. #define ENV_RESERVE      27
  65. #define ENV_OLM          28
  66. #define ENV_FLAGFILES    29
  67. #define ENV_HYDRALINK    30
  68. #define ENV_RINGDETECT   31
  69.  
  70. #define SV_SYSOPLOG       154
  71. #define SV_LOCALLOG       155
  72. #define SV_ACCOUNTS       156
  73. #define SV_CHAT           157
  74. #define SV_NODEOFFHOOK    158
  75. #define SV_EXITNODE       159
  76. #define SV_INITMODEM      160
  77. #define SV_WHATSUP        161
  78. #define RESERVED_BLOCK10  162
  79. #define SV_INSTANT        170
  80. #define SV_RESERVE        171
  81. #define SV_CHATTOGGLE     172
  82. #define SV_AESHELL        174
  83. #define SV_CLIPBOARD      175
  84. #define SV_START          176
  85. #define SV_NEWMSG         177
  86. #define SV_QUIETNODE      178
  87. #define SV_SETNRAMS       179
  88. #define SV_RESERVENODE    180
  89. #define SV_MSGCPS         181//add this one
  90.  
  91. #define WAIT     600
  92. #define NOWAIT   FALSE
  93. #define YES      TRUE
  94. #define NO       FALSE
  95. #define ECHO     TRUE
  96. #define NOECHO   FALSE
  97. #define CSI      0x9B
  98. #define RIGHTARROW 2
  99. #define LEFTARROW 3
  100. #define UPARROW 4
  101. #define DOWNARROW 5
  102.  
  103. #define IOFLAG_FIL_IN   0
  104. #define IOFLAG_KBD_IN   1
  105. #define IOFLAG_SER_IN   2
  106. #define IOFLAG_FIL_OUT  3
  107. #define IOFLAG_PRT_OUT  4
  108. #define IOFLAG_SCR_OUT  5
  109. #define IOFLAG_SER_OUT  6
  110.  
  111. #define TIMEOUT  -3
  112. #define NO_CARRIER -4
  113. #define GOODBYE  -7
  114. #define EXITCHAT  -8
  115.  
  116. #define STAT_STARTUP    0
  117. #define STAT_LOGON      1
  118. #define STAT_LOGOFF     2
  119. #define STAT_GUEST_CALL 3
  120. #define STAT_NEW_CALL   4
  121. #define STAT_VALID_CALL 5
  122. #define STAT_MESSAGE    6
  123. #define STAT_LETTER     7
  124. #define STAT_UPLOAD     8
  125. #define STAT_DOWNLOAD   9
  126. #define STAT_NEW_MEMBER 10
  127. #define STAT_SHUTDOWN   11
  128.  
  129. ///ZModem Struct
  130. struct ZModem {
  131.  char    FileName[40], TitleBar[60], ZStat[60];
  132.  long    Filesize, Cps,  Eff, RecPos, ErrorPos, ResumePos;
  133.  ULONG   ApxTime, LastTime;
  134.  char    Pad[2];
  135. };
  136. ///
  137. /// TempSysopInfo
  138. struct TempSysopInfo {
  139.         UWORD           AccessLevel;
  140.         UWORD           RatioType;
  141.         UWORD           Ratio;
  142.         LONG            TimeTotal;
  143.         UBYTE           ConfAc[10];
  144.         };
  145. ///
  146. /// Struct for User.Data!
  147.  
  148.  
  149. struct User {
  150.  char    Name[31],Pass[9],Location[30],PhoneNumber[13];
  151.  USHORT  Slot_Number;
  152.  USHORT  Sec_Status,
  153.          Sec_Board,                   /* File or Byte Ratio */
  154.          Sec_Library,                 /* Ratio              */
  155.          Sec_Bulletin,                /* Computer Type      */
  156.          Messages_Posted; /* Note ConfYM = the last msg you actually read, ConfRead is the same ?? */
  157.  ULONG   NewSinceDate;
  158.  ULONG   ConfRead1, ConfRead2, ConfRead3, ConfRead4, ConfRead5,  ConfRead6,
  159.          ConfRead7, ConfRead8, ConfRead9;
  160.  char    Conference_Access[10];
  161.  USHORT  Uploads, Downloads, ConfRJoin, Times_Called;
  162.  long    Time_Last_On, Time_Used, Time_Limit, Time_Total;
  163.  ULONG   Bytes_Download,
  164.      Bytes_Upload,
  165.      Daily_Bytes_Limit,
  166.      Daily_Bytes_Dld;
  167.  char    Expert;
  168.  double  NBytes_Download,        // Bytes Downloaded as a "double"
  169.      NBytes_Upload,            // Bytes Uploaded as a "double"
  170.      NDaily_Bytes_Limit,        // Daily Bytes Limit
  171.      NDaily_Bytes_Dld;        // Bytes Downloaded today.
  172.  UBYTE   Flag1, Flag2, FLag3, EditorType;
  173.  long    BeginLogCall;
  174.  UBYTE   Protocol, UUCPA, LineLength, New_User;
  175.  }; // UUCPA == AnsiUserFlag!
  176. ///
  177. /// Struct for User.keys!
  178. struct UserKeys {                 /* changes to UserKeys (RTS) */
  179.  char    UserName[31];
  180.  long    Number;
  181.  UBYTE   New_User;
  182.  UWORD   UPcps,              /* highest upload cps rate */
  183.          DNcps,              /* highest dnload cps rate */
  184.          Userflags,          /*                         */
  185.          baud_rate;          /* last online baud rate   */
  186.  UBYTE   QFlag,
  187.          Who,
  188.          MailScan,
  189.          Language,
  190.          QuietNode,
  191.          MaxCalls,
  192.          Called,
  193.          ReplySkip;
  194.  char    Pad[1];             /* ?? should be 15         */
  195. };
  196. ///
  197. ///Struct for MailHeader
  198. struct MailHeader {
  199.         char    Status[1];
  200.         long    MsgNumb;
  201.         char    ToName[31],
  202.                 FromName[31],
  203.                 Subject[31];
  204.         long    MsgDate,
  205.                 Recv;
  206.         UBYTE   Conference;
  207.         };
  208. ///
  209. ///Unused struct so far...
  210. struct FNodeStatus {
  211.         char    FileUpload[32];
  212.         char    FileDownload[32];
  213.  
  214.         long    FileUpSize;
  215.         long    FileUpCurr;
  216.         long    FileDSize;
  217.         long    FileDCurr;
  218.         
  219.         int     CPSUp;
  220.         int     CPSDl;
  221.         };
  222. ///
  223. ///Struct for MailStat File
  224. struct MailStat {
  225.         long    LowestKey,
  226.                 HighMsgNum,
  227.                 LowestNotDel;
  228.         char Pad[6];
  229.         };
  230. ///
  231. ///Struct for Conf.DB File
  232. struct ConfBase
  233. {
  234.   char Handle[31];
  235.   ULONG NewSinceDate, ConfRead,ConfYM;
  236.   ULONG Bytes_Download,Bytes_Upload;
  237.   ULONG Daily_Bytes_Limit,Daily_Bytes_Dld;
  238.   USHORT Upload,Downloads,RatioType,Ratio,Messages_Posted;
  239.   UWORD Access;
  240.   UWORD Active;
  241. };
  242. ///
  243. ///struct for soon to be coming user.misc file...
  244. struct UserMisc
  245. {
  246.   char Handle[31];    //maybe not used....
  247.   ULONG ConfAxx;    //not sure yet...
  248.   ULONG MiscInfo;    //Not sure yet...
  249.   char MsgSentBy[76];    //MAX 75 Chars +1 Pad
  250.   char SentBy[46];    //MAX 45 + 1 Pad
  251.   
  252.   char  Pad[264];    //Just incase...
  253. };                  //Maybe used later on, not sure yet what i should
  254.                     //Put in here.... exactly 425 Bytes per User...
  255. ///
  256.  
  257. struct ConfCfg
  258. {
  259.  int  ConfNum;
  260.  char ConfName[100];
  261.  char ConfLoc[255];
  262.  char MsgLoc[255];
  263.  char Password[30];
  264.  BOOL SentBy;
  265.  BOOL MsgShared;
  266. };
  267.  
  268. ///erm... dunno .. some struct
  269. struct MyData
  270. {
  271.   int Type,Size,misc1,Version;
  272. };
  273. ///
  274. ///struct used for communicating with the ACP
  275. struct MasterData
  276. {
  277.    struct MyData   Code;
  278.    struct ConfBase Conf;
  279. };
  280. ///
  281.  
  282. /* Structure for the TOPCPS.DAT File */
  283.  
  284. struct topcps
  285. {
  286.     long    upCPS;
  287.     char    upNAME[40];
  288.     long    downCPS;
  289.     char    downNAME[40];
  290. };
  291.  
  292.  
  293. /* stupid defines , theres gotta be a better way , will have to 
  294.    consult the Lattice Manual */
  295.  
  296. #define AbortIO(x) AbortIO((struct IORequest *)x)
  297. #define CheckIO(x) CheckIO((struct IORequest *)x)
  298. #define WaitIO(x) WaitIO((struct IORequest *)x)
  299. #define SendIO(x) SendIO((struct IORequest *)x)
  300. #define DoIO(x) DoIO((struct IORequest *)x)
  301. #define BeginIO(x) BeginIO((struct IORequest *)x)
  302.  
  303. #define OpenDevice(a, b, c, d) OpenDevice(a, b, (struct IORequest *)c, d)
  304. #define CloseDevice(x) CloseDevice((struct IORequest *)x)
  305.  
  306. #define DeleteExtIO(x) DeleteExtIO((struct IORequest *)x)
  307.  
  308. #define Tell(x)  Seek(x,0L,OFFSET_CURRENT)
  309.  
  310. #undef PutStr
  311.  
  312. ///struct for the whole Config of the ACP...
  313. struct StartOption
  314. {
  315.   SHORT LeftEdge;
  316.   SHORT TopEdge;
  317.   SHORT Width;
  318.   SHORT Height;
  319.   int BitPlanes;
  320.   BOOL StatBar;
  321.   BOOL Interlace;
  322.   BOOL DupeCheck;
  323.   BOOL QLogon;
  324.   BOOL TakeCredits;
  325.   BOOL SeenIt;
  326.   BOOL TrapDoor;
  327.   BOOL Iconify;
  328.   BOOL Eall_level;
  329.   BOOL A2232;
  330.   BOOL Toggles[20];
  331.   char Logoff[80];
  332.   char ShutDown[80];
  333.   char CycleLock[80];
  334.   char RamPen[80];
  335.   char BBSConfig[80];
  336.   char FilesNot[80];
  337.   char UserData[80];
  338.   char UserKey[80];
  339.   char OffHook[80];
  340.   char NodeScreen[80];
  341.   APTR t;
  342.   APTR s;
  343.   char LocalPath[80];
  344. };
  345. ///
  346.  
  347. #define ACS_ACCOUNT_EDITING      0
  348. #define ACS_BULLETINS            1
  349. #define ACS_COMMENT_TO_SYSOP     2
  350. #define ACS_DOWNLOAD             3
  351. #define ACS_UPLOAD               4
  352. #define ACS_ENTER_MESSAGE        5
  353. #define ACS_FILE_LISTINGS        6
  354. #define ACS_JOIN_CONFERENCE      7
  355. #define ACS_NEW_FILES_SINCE      8
  356. #define ACS_PAGE_SYSOP           9
  357. #define ACS_READ_MSG             10
  358. #define ACS_REMOTE_SHELL         11
  359. #define ACS_DISPLAY_USER_STATS   12
  360. #define ACS_VIEW_A_FILE          13
  361. #define ACS_EDIT_USER_INFO       14
  362. #define ACS_EDIT_USER_NAME       15
  363. #define ACS_EDIT_USER_LOCATION   16
  364. #define ACS_EDIT_PHONE_NUMBER    17
  365. #define ACS_EDIT_PASSWORD        18
  366. #define ACS_ZIPPY_TEXT_SEARCH    19
  367. #define ACS_OVERRIDE_CHAT        20
  368. #define ACS_SYSOP_DOWNLOAD       21
  369. #define ACS_SYSOP_VIEW           22
  370. #define ACS_SYSOP_READ           23
  371. #define ACS_KEEP_UPLOAD_CREDIT   24
  372. #define ACS_OVERRIDE_TIMES       25
  373. #define ACS_CLEAR_SCREEN_MSG     26
  374. #define ACS_ALLOW_FREE_RESUMING  27
  375. #define ACS_ONE_TIME_BULLETINS   28
  376. #define ACS_DO_CALLERSLOG        29
  377. #define ACS_SENTBY_FILES         30
  378. #define ACS_DO_UD_LOG            31
  379. #define ACS_SCREEN_TO_FRONT      32
  380. #define ACS_DEFAULT_CHAT_ON      33
  381. #define ACS_EALL_LEVEL           34
  382. #define ACS_DUPE_FILECHECK       35
  383. #define ACS_MSG_EDIT             36
  384. #define ACS_NODE_LIST            37
  385. #define ACS_MSG_LEVEL            38
  386. #define ACS_MSG_EXPERATION       39
  387. #define ACS_DELETE_MSG           40
  388. #define ACS_ATTACH_FILES         41
  389. #define ACS_CUSTOMCOMMANDS       42
  390. #define ACS_JOIN_SUB_CONFERENCE  43
  391. #define ACS_ZOOM_MAIL            44
  392. #define ACS_MCI_MSG              45
  393. #define ACS_EDIT_DIRS            46
  394. #define ACS_EDIT_ANY             47
  395. #define ACS_BREAK_CHAT           48
  396. #define ACS_QUIET_NODE           49
  397. #define ACS_SYSOP_COMMANDS       50
  398. #define ACS_WHO_IS_ONLINE        51
  399. #define ACS_RELOGON              52
  400. #define ACS_ULSTATS              53
  401. #define ACS_XPR_RECEIVE          54
  402. #define ACS_XPR_SEND             55
  403. #define ACS_WILDCARDS            56
  404. #define ACS_CONFERENCE_ACCOUNTING 57
  405. #define ACS_PRI_MSGFILES         58
  406. #define ACS_PUB_MSGFILES         59
  407. #define ACS_DIR_IN_KBYTE         60
  408. #define ACS_STEALTH_MODE         61
  409. #define ACS_QUIET_NODEOK         62
  410. #define ACS_WHO_FILENAMES        63
  411.  
  412.  
  413. //#define ADD_BIT(x) newacs[x/16] |= ten[x%16]
  414. //#define REM_BIT(x) newacs[x/16] ^= ten[x%16]
  415. //#define GET_BIT(x) newacs[x/16] |  ten[x%16]
  416.  
  417. #define LVL_ACCOUNT_EDITING      0
  418. #define LVL_COMMENT_TO_SYSOP     1
  419. #define LVL_DOWNLOAD             2
  420. #define LVL_ENTER_MESSAGE        3
  421. #define LVL_FILE_LISTINGS        4
  422. #define LVL_JOIN_CONFERENCE      5
  423. #define LVL_NEW_FILES_SINCE      6
  424. #define LVL_PAGE_SYSOP           7
  425. #define LVL_READ_MSG             8
  426. #define LVL_DISPLAY_USER_STATS   9
  427. #define LVL_UPLOAD               10
  428. #define LVL_VIEW_A_FILE          11
  429. #define LVL_EDIT_USER_INFO       12
  430. #define LVL_REMOTE_SHELL         13
  431. #define LVL_ZIPPY_TEXT_SEARCH    14
  432. #define LVL_OVERRIDE_CHAT        15
  433. #define LVL_EDIT_USER_NAME       16
  434. #define LVL_EDIT_USER_LOCATION   17
  435. #define LVL_EDIT_PHONE_NUMBER    18
  436. #define LVL_EDIT_PASSWORD        19
  437. #define LVL_SENTBY_FILES         20
  438. #define LVL_DEFAULT_CHAT_ON      21
  439. #define LVL_CLEAR_SCREEN_MSG     22
  440. #define LVL_CAPITOLS_in_FILE     23
  441. #define LVL_CHAT_COLOR_SYSOP     24
  442. #define LVL_CHAT_COLOR_USER      25
  443. #define LVL_VARYING_LINK_RATE    26
  444. #define LVL_KEEP_UPLOAD_CREDIT   27
  445. #define LVL_ALLOW_FREE_RESUMING  28
  446. #define LVL_DO_CALLERSLOG        29
  447. #define LVL_DO_UD_LOG            30
  448. #define LVL_OVERRIDE_TIMES       41
  449. #define LVL_BULLETINS            42
  450. #define LVL_SYSOP_READ           43
  451. #define LVL_NODE_NUMBER          44
  452. #define LVL_SCREEN_TO_FRONT      45
  453. #define LVL_ZOO                  46
  454. #define LVL_PKAX                 47
  455. #define LVL_LHARC                48
  456. #define LVL_WARP                 49
  457. #define LVL_ZIP                  50
  458. #define LVL_WHO_IS_ONLINE        51
  459. #define LVL_WILDCARDS            56
  460. #define LVL_DIR_IN_KBYTE         60
  461. #define LVL_STEALTH_MODE         61
  462. #define LVL_QUIET_NODEOK         62
  463. #define LVL_WHO_FILENAMES        63
  464.  
  465. #define DEBUG_BEGIN             0
  466. #define DEBUG_DROPDTR           1
  467. #define DEBUG_AWAITING_CONNECT  2
  468. #define DEBUG_RESETING_NODE     3
  469. #define DEBUG_RESETING_MODEM    4
  470. #define DEBUG_MODEM_RESET       5
  471. #define DEBUG_CHECKING_SHUTDOWN 6
  472. #define DEBUG_CONNECT_TIMEOUT   7
  473. #define DEBUG_BAD_CONNECT       8
  474. #define DEBUG_SER_ROUTINES      9
  475. #define DEBUG_CON_ROUTINES     10
  476. #define DEBUG_CONNECT          11
  477. #define DEBUG_SYSOP_LOGON      12
  478. #define DEBUG_REMOTE_LOGON     13
  479. #define DEBUG_SUSPEND_LOGON    14
  480. #define DEBUG_LOCAL_LOGON      15
  481. #define DEBUG_LOGOFF_SCRIPT    16
  482.  
  483. #define CONSOLE_PORT 1
  484. #define SERIAL_PORT 2
  485.